package com.qf.springmvc.forward;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/test")

public class TestController {
    @RequestMapping("/test1")
    public String test1(){
        System.out.println("test1执行了----------------");
        return "forward:/test/test2";
    }
    @RequestMapping("/test2")
    public String test2(){
        System.out.println("test2执行了----------------");
        return "redirect:/test2/test1";
    }
}
